﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CSRedis
{
    public class KeyIdTuple
    {
        public KeyIdTuple() { }
        public KeyIdTuple(string key, string id)
        {
            this.key = key;
            this.id = id;
        }

        public string key { get; set; }
        public string id { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (KeyIdTuple)obj;
            if (this.key != obj2.key) return false;
            if (this.id != obj2.id) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return (this.key == null ? 0 : this.key.GetHashCode())
                ^ (this.id == null ? 0 : this.id.GetHashCode());
        }
        public static bool operator ==(KeyIdTuple left, KeyIdTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(KeyIdTuple left, KeyIdTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class ItemIncrementTuple
    {
        public ItemIncrementTuple() { }
        public ItemIncrementTuple(object item, long increment)
        {
            this.item = item;
            this.increment = increment;
        }
        public object item { get; set; }
        public long increment { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (ItemIncrementTuple)obj;
            if (this.item != obj2.item) return false;
            if (this.increment != obj2.increment) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return (this.item == null ? 0 : this.item.GetHashCode())
                ^ (this.increment.GetHashCode());
        }
        public static bool operator ==(ItemIncrementTuple left, ItemIncrementTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(ItemIncrementTuple left, ItemIncrementTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class FieldValueTuple<T>
    {
        public FieldValueTuple() { }
        public FieldValueTuple(string field, T value)
        {
            this.field = field;
            this.value = value;
        }
        public string field { get; set; }
        public T value { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (FieldValueTuple<T>)obj;
            if (this.field != obj2.field) return false;
            if (!Equals(this.value, obj2.value)) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return (this.field == null ? 0 : this.field.GetHashCode())
                ^ (Equals(this.value, default(T)) ? 0 : this.value.GetHashCode());
        }
        public static bool operator ==(FieldValueTuple<T> left, FieldValueTuple<T> right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(FieldValueTuple<T> left, FieldValueTuple<T> right)
        {
            return !Equals(left, right);
        }
    }
    public class NodeValueTuple<T>
    {
        public NodeValueTuple() { }
        public NodeValueTuple(string node, T value)
        {
            this.node = node;
            this.value = value;
        }

        public string node { get; set; }
        public T value { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (NodeValueTuple<T>)obj;
            if (this.node != obj2.node) return false;
            if (!Equals(this.value, obj2.value)) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return (this.node == null ? 0 : this.node.GetHashCode())
                ^ (Equals(this.value, default(T)) ? 0 : this.value.GetHashCode());
        }
        public static bool operator ==(NodeValueTuple<T> left, NodeValueTuple<T> right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(NodeValueTuple<T> left, NodeValueTuple<T> right)
        {
            return !Equals(left, right);
        }
    }
    public class KeyValueTuple<T>
    {
        public KeyValueTuple() { }
        public KeyValueTuple(string key, T value)
        {
            this.key = key;
            this.value = value;
        }

        public string key { get; set; }
        public T value { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (KeyValueTuple<T>)obj;
            if (this.key != obj2.key) return false;
            if (!Equals(this.value, obj2.value)) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return (this.key == null ? 0 : this.key.GetHashCode())
                ^ (Equals(this.value, default(T)) ? 0 : this.value.GetHashCode());
        }
        public static bool operator ==(KeyValueTuple<T> left, KeyValueTuple<T> right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(KeyValueTuple<T> left, KeyValueTuple<T> right)
        {
            return !Equals(left, right);
        }
    }



    public class RedisCfInfoCommandTuple
    {
        public long size { get; set; }
        public long numberOfBuckets { get; set; }
        public long numberOfFilter { get; set; }
        public long numberOfItemsInserted { get; set; }
        public long numberOfItemsDeleted { get; set; }
        public long bucketSize { get; set; }
        public long expansionRate { get; set; }
        public long maxIteration { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisCfInfoCommandTuple)obj;
            if (this.size != obj2.size) return false;
            if (this.numberOfBuckets != obj2.numberOfBuckets) return false;
            if (this.numberOfFilter != obj2.numberOfFilter) return false;
            if (this.numberOfItemsInserted != obj2.numberOfItemsInserted) return false;
            if (this.numberOfItemsDeleted != obj2.numberOfItemsDeleted) return false;
            if (this.bucketSize != obj2.bucketSize) return false;
            if (this.expansionRate != obj2.expansionRate) return false;
            if (this.maxIteration != obj2.maxIteration) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return this.size.GetHashCode()
                ^ this.numberOfBuckets.GetHashCode()
                ^ this.numberOfFilter.GetHashCode()
                ^ this.numberOfItemsInserted.GetHashCode()
                ^ this.numberOfItemsDeleted.GetHashCode()
                ^ this.bucketSize.GetHashCode()
                ^ this.expansionRate.GetHashCode()
                ^ this.maxIteration.GetHashCode()                ;
        }
        public static bool operator ==(RedisCfInfoCommandTuple left, RedisCfInfoCommandTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisCfInfoCommandTuple left, RedisCfInfoCommandTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class RedisBfInfoCommandTuple
    {
        public long capacity { get; set; }
        public long size { get; set; }
        public long numberOfFilters { get; set; }
        public long numberOfItemsInserted { get; set; }
        public long expansionRate { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisBfInfoCommandTuple)obj;
            if (this.capacity != obj2.capacity) return false;
            if (this.size != obj2.size) return false;
            if (this.numberOfFilters != obj2.numberOfFilters) return false;
            if (this.numberOfItemsInserted != obj2.numberOfItemsInserted) return false;
            if (this.expansionRate != obj2.expansionRate) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return this.capacity.GetHashCode()
                ^ this.size.GetHashCode()
                ^ this.numberOfFilters.GetHashCode()
                ^ this.numberOfItemsInserted.GetHashCode()
                ^ this.expansionRate.GetHashCode();
        }
        public static bool operator ==(RedisBfInfoCommandTuple left, RedisBfInfoCommandTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisBfInfoCommandTuple left, RedisBfInfoCommandTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class RedisCmsInfoCommandTuple
    {
        public long width { get; set; }
        public long depth { get; set; }
        public long count { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisCmsInfoCommandTuple)obj;
            if (this.width != obj2.width) return false;
            if (this.depth != obj2.depth) return false;
            if (this.count != obj2.count) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return this.width.GetHashCode()
                ^ this.depth.GetHashCode()
                ^ this.count.GetHashCode();
        }
        public static bool operator ==(RedisCmsInfoCommandTuple left, RedisCmsInfoCommandTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisCmsInfoCommandTuple left, RedisCmsInfoCommandTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class RedisTopkInfoCommandTuple
    {
        public long k { get; set; }
        public long width { get; set; }
        public long depth { get; set; }
        public decimal decay { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisTopkInfoCommandTuple)obj;
            if (this.k != obj2.k) return false;
            if (this.width != obj2.width) return false;
            if (this.depth != obj2.depth) return false;
            if (this.decay != obj2.decay) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return this.k.GetHashCode()
                ^ this.width.GetHashCode()
                ^ this.depth.GetHashCode()
                ^ this.decay.GetHashCode();
        }
        public static bool operator ==(RedisTopkInfoCommandTuple left, RedisTopkInfoCommandTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisTopkInfoCommandTuple left, RedisTopkInfoCommandTuple right)
        {
            return !Equals(left, right);
        }
    }



    public class RedisXIdItemsTuple
    {
        public RedisXIdItemsTuple() { }
        public RedisXIdItemsTuple(string id, string[] items)
        {
            this.id = id;
            this.items = items;
        }

        public string id { get; set; }
        public string[] items { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisXIdItemsTuple)obj;
            if (this.id != obj2.id) return false;
            if (this.items == null && obj2.items == null) return true;
            if (this.items == null || obj2.items == null) return false;
            if (this.items.Length != obj2.items.Length) return false;
            for (int i = 0, len = this.items.Length; i < len; i++) { if (this.items[i] != obj2.items[i]) return false; }
            return true;
        }
        public override int GetHashCode()
        {
            var hash = this.id.GetHashCode();
            if (items != null && items.Length >= 1) { foreach (var item in this.items) hash = hash ^ (item == null ? 0 : item.GetHashCode()); }
            return hash;
        }
        public static bool operator ==(RedisXIdItemsTuple left, RedisXIdItemsTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisXIdItemsTuple left, RedisXIdItemsTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class RedisXReadCommandTuple
    {
        public RedisXReadCommandTuple() { }
        public RedisXReadCommandTuple(string key, RedisXIdItemsTuple[] data)
        {
            this.key = key;
            this.data = data;
        }

        public string key { get; set; }
        public RedisXIdItemsTuple[] data { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisXReadCommandTuple)obj;
            if (this.key != obj2.key) return false;
            if (this.data == null && obj2.data == null) return true;
            if (this.data == null || obj2.data == null) return false;
            if (this.data.Length != obj2.data.Length) return false;
            for (int i = 0, len = this.data.Length; i < len; i++) { if (!Equals(this.data[i], obj2.data[i])) return false; }
            return true;
        }
        public override int GetHashCode()
        {
            var hash = this.key.GetHashCode();
            if (data != null && data.Length >= 1) { foreach (var item in this.data) hash = hash ^ (item == null ? 0 : item.GetHashCode()); }
            return hash;
        }
        public static bool operator ==(RedisXReadCommandTuple left, RedisXReadCommandTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisXReadCommandTuple left, RedisXReadCommandTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class RedisXPendingCommandTuple
    {
        public RedisXPendingCommandTuple() { }
        public RedisXPendingCommandTuple(long count, string minId, string maxId, RedisXPendingCommandTuplePending[] pendings)
        {
            this.count = count;
            this.minId = minId;
            this.maxId = maxId;
            this.pendings = pendings;
        }

        public long count { get; set; }
        public string minId { get; set; }
        public string maxId { get; set; }
        public RedisXPendingCommandTuplePending[] pendings { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisXPendingCommandTuple)obj;
            if (this.count != obj2.count) return false;
            if (this.minId != obj2.minId) return false;
            if (this.maxId != obj2.maxId) return false;
            return true;
        }
        public override int GetHashCode()
        {
            var hash = this.count.GetHashCode()
                ^ this.minId.GetHashCode()
                ^ this.maxId.GetHashCode();
            if (pendings != null && pendings.Length >= 1) { foreach (var item in this.pendings) hash = hash ^ (item == null ? 0 : item.GetHashCode()); }
            return hash;
        }
        public static bool operator ==(RedisXPendingCommandTuple left, RedisXPendingCommandTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisXPendingCommandTuple left, RedisXPendingCommandTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class RedisXPendingCommandTuplePending
    {
        public RedisXPendingCommandTuplePending() { }
        public RedisXPendingCommandTuplePending(string consumer, long count)
        {
            this.consumer = consumer;
            this.count = count;
        }

        public string consumer { get; set; }
        public long count { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisXPendingCommandTuplePending)obj;
            if (this.consumer != obj2.consumer) return false;
            if (this.count != obj2.count) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return this.consumer.GetHashCode()
                ^ this.count.GetHashCode();
        }
        public static bool operator ==(RedisXPendingCommandTuplePending left, RedisXPendingCommandTuplePending right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisXPendingCommandTuplePending left, RedisXPendingCommandTuplePending right)
        {
            return !Equals(left, right);
        }
    }
    public class RedisXPendingStartEndCountCommandTuple
    {
        public RedisXPendingStartEndCountCommandTuple() { }
        public RedisXPendingStartEndCountCommandTuple(string id, string consumer, long idle, long transferTimes)
        {
            this.id = id;
            this.consumer = consumer;
            this.idle = idle;
            this.transferTimes = transferTimes;
        }

        public string id { get; set; }
        public string consumer { get; set; }
        public long idle { get; set; }
        public long transferTimes { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisXPendingStartEndCountCommandTuple)obj;
            if (this.id != obj2.id) return false;
            if (this.consumer != obj2.consumer) return false;
            if (this.idle != obj2.idle) return false;
            if (this.transferTimes != obj2.transferTimes) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return this.id.GetHashCode()
                ^ this.consumer.GetHashCode()
                ^ this.idle.GetHashCode()
                ^ this.transferTimes.GetHashCode();
        }
        public static bool operator ==(RedisXPendingStartEndCountCommandTuple left, RedisXPendingStartEndCountCommandTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisXPendingStartEndCountCommandTuple left, RedisXPendingStartEndCountCommandTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class RedisXInfoStreamCommandTuple
    {
        public long length { get; set; }
        public long radixTreeKeys { get; set; }
        public long radixTreeNodes { get; set; }
        public long groups { get; set; }
        public string lastGeneratedId { get; set; }
        public RedisXIdItemsTuple firstEntry { get; set; }
        public RedisXIdItemsTuple lastEntry { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisXInfoStreamCommandTuple)obj;
            if (this.length != obj2.length) return false;
            if (this.radixTreeKeys != obj2.radixTreeKeys) return false;
            if (this.radixTreeNodes != obj2.radixTreeNodes) return false;
            if (this.groups != obj2.groups) return false;
            if (this.lastGeneratedId != obj2.lastGeneratedId) return false;
            if (!Equals(this.firstEntry, obj2.firstEntry)) return false;
            if (!Equals(this.lastEntry, obj2.lastEntry)) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return this.length.GetHashCode()
                ^ this.radixTreeKeys.GetHashCode()
                ^ this.radixTreeNodes.GetHashCode()
                ^ this.groups.GetHashCode()
                ^ this.lastGeneratedId.GetHashCode()
                ^ (firstEntry == null ? 0 : firstEntry.GetHashCode())
                ^ (lastEntry == null ? 0 : lastEntry.GetHashCode())
                ;
        }
        public static bool operator ==(RedisXInfoStreamCommandTuple left, RedisXInfoStreamCommandTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisXInfoStreamCommandTuple left, RedisXInfoStreamCommandTuple right)
        {
            return !Equals(left, right);
        }
    }

    public class RedisXInfoGroupsCommandTuple
    {
        public string name { get; set; }
        public long consumers { get; set; }
        public long pending { get; set; }
        public string lastDeliveredId { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisXInfoGroupsCommandTuple)obj;
            if (this.name != obj2.name) return false;
            if (this.consumers != obj2.consumers) return false;
            if (this.pending != obj2.pending) return false;
            if (this.lastDeliveredId != obj2.lastDeliveredId) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return this.name.GetHashCode()
                ^ this.consumers.GetHashCode()
                ^ this.pending.GetHashCode()
                ^ this.lastDeliveredId.GetHashCode()
                ;
        }
        public static bool operator ==(RedisXInfoGroupsCommandTuple left, RedisXInfoGroupsCommandTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisXInfoGroupsCommandTuple left, RedisXInfoGroupsCommandTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class RedisXInfoConsumersCommandTuple
    {
        public string name { get; set; }
        public long pending { get; set; }
        public long idle { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (RedisXInfoConsumersCommandTuple)obj;
            if (this.name != obj2.name) return false;
            if (this.pending != obj2.pending) return false;
            if (this.idle != obj2.idle) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return this.name.GetHashCode()
                ^ this.pending.GetHashCode()
                ^ this.idle.GetHashCode()
                ;
        }
        public static bool operator ==(RedisXInfoConsumersCommandTuple left, RedisXInfoConsumersCommandTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(RedisXInfoConsumersCommandTuple left, RedisXInfoConsumersCommandTuple right)
        {
            return !Equals(left, right);
        }
    }



    public class GeoPosTuple
    {
        public GeoPosTuple() { }
        public GeoPosTuple(decimal longitude, decimal latitude)
        {
            this.longitude = longitude;
            this.latitude = latitude;
        }
        public decimal longitude { get; set; }
        public decimal latitude { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (GeoPosTuple)obj;
            if (this.longitude != obj2.longitude) return false;
            if (this.latitude != obj2.latitude) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return (this.longitude.GetHashCode())
                ^ (this.latitude.GetHashCode())
                ;
        }
        public static bool operator ==(GeoPosTuple left, GeoPosTuple right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(GeoPosTuple left, GeoPosTuple right)
        {
            return !Equals(left, right);
        }
    }
    public class GeoRadiusTuple<T>
    {
        public GeoRadiusTuple() { }
        public GeoRadiusTuple(T member, decimal dist, decimal longitude, decimal latitude, long hash)
        {
            this.member = member;
            this.dist = dist;
            this.longitude = longitude;
            this.latitude = latitude;
            this.hash = hash;
        }
        public T member { get; set; }
        public decimal dist { get; set; }
        public decimal longitude { get; set; }
        public decimal latitude { get; set; }
        public long hash { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (GeoRadiusTuple<T>)obj;
            if (!Equals(this.member, obj2.member)) return false;
            if (this.dist != obj2.dist) return false;
            if (this.longitude != obj2.longitude) return false;
            if (this.latitude != obj2.latitude) return false;
            if (this.hash != obj2.hash) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return (Equals(this.member, default(T)) ? 0 : this.member.GetHashCode())
                ^ (this.dist.GetHashCode())
                ^ (this.longitude.GetHashCode())
                ^ (this.latitude.GetHashCode())
                ^ (this.hash.GetHashCode())
                ;
        }
        public static bool operator ==(GeoRadiusTuple<T> left, GeoRadiusTuple<T> right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(GeoRadiusTuple<T> left, GeoRadiusTuple<T> right)
        {
            return !Equals(left, right);
        }
    }
    public class GeoRadiusWithDistTuple<T>
    {
        public GeoRadiusWithDistTuple() { }
        public GeoRadiusWithDistTuple(T member, decimal dist)
        {
            this.member = member;
            this.dist = dist;
        }
        public T member { get; set; }
        public decimal dist { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (GeoRadiusWithDistTuple<T>)obj;
            if (!Equals(this.member, obj2.member)) return false;
            if (this.dist != obj2.dist) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return (Equals(this.member, default(T)) ? 0 : this.member.GetHashCode())
                ^ (this.dist.GetHashCode())
                ;
        }
        public static bool operator ==(GeoRadiusWithDistTuple<T> left, GeoRadiusWithDistTuple<T> right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(GeoRadiusWithDistTuple<T> left, GeoRadiusWithDistTuple<T> right)
        {
            return !Equals(left, right);
        }
    }
    public class GeoRadiusWithCoordTuple<T>
    {
        public GeoRadiusWithCoordTuple() { }
        public GeoRadiusWithCoordTuple(T member, decimal longitude, decimal latitude)
        {
            this.member = member;
            this.longitude = longitude;
            this.latitude = latitude;
        }
        public T member { get; set; }
        public decimal longitude { get; set; }
        public decimal latitude { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (GeoRadiusWithCoordTuple<T>)obj;
            if (!Equals(this.member, obj2.member)) return false;
            if (this.longitude != obj2.longitude) return false;
            if (this.latitude != obj2.latitude) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return (Equals(this.member, default(T)) ? 0 : this.member.GetHashCode())
                ^ (this.longitude.GetHashCode())
                ^ (this.latitude.GetHashCode())
                ;
        }
        public static bool operator ==(GeoRadiusWithCoordTuple<T> left, GeoRadiusWithCoordTuple<T> right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(GeoRadiusWithCoordTuple<T> left, GeoRadiusWithCoordTuple<T> right)
        {
            return !Equals(left, right);
        }
    }
    public class GeoRadiusWithDistAndCoordTuple<T>
    {
        public GeoRadiusWithDistAndCoordTuple() { }
        public GeoRadiusWithDistAndCoordTuple(T member, decimal dist, decimal longitude, decimal latitude)
        {
            this.member = member;
            this.dist = dist;
            this.longitude = longitude;
            this.latitude = latitude;
        }
        public T member { get; set; }
        public decimal dist { get; set; }
        public decimal longitude { get; set; }
        public decimal latitude { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != this.GetType()) return false;

            var obj2 = (GeoRadiusWithDistAndCoordTuple<T>)obj;
            if (!Equals(this.member, obj2.member)) return false;
            if (this.dist != obj2.dist) return false;
            if (this.longitude != obj2.longitude) return false;
            if (this.latitude != obj2.latitude) return false;
            return true;
        }
        public override int GetHashCode()
        {
            return (Equals(this.member, default(T)) ? 0 : this.member.GetHashCode())
                ^ (this.dist.GetHashCode())
                ^ (this.longitude.GetHashCode())
                ^ (this.latitude.GetHashCode())
                ;
        }
        public static bool operator ==(GeoRadiusWithDistAndCoordTuple<T> left, GeoRadiusWithDistAndCoordTuple<T> right)
        {
            return Equals(left, right);
        }
        public static bool operator !=(GeoRadiusWithDistAndCoordTuple<T> left, GeoRadiusWithDistAndCoordTuple<T> right)
        {
            return !Equals(left, right);
        }
    }





}
